package org.xiaozhou.chatgptcativen.domain.security.validate;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.xiaozhou.chatgptcativen.application.IWeiXinValidateService;
import org.xiaozhou.chatgptcativen.infrastrctrue.utils.sdk.SignatureUtil;

@Service
public class WeiXinValidateServiceImpl implements IWeiXinValidateService {
    @Value("${wx.config.token}")
    private String token;
    @Override
    public boolean checkSign(String signature, String timestamp, String nonce, String echostr) {
        return SignatureUtil.check(token, signature, timestamp, nonce);
    }
}
